package com.gopay.common.domain.bank.boc.bcdl.interbank.req;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;

import com.gopay.common.domain.bank.boc.bcdl.Trans;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("trn-b2e0251-rq")
public class TransReqInterBank extends Trans {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1095967604337984480L;
	@XStreamImplicit(itemFieldName="b2e0251-rq")
	private List<Inner> inners;
	
	public TransReqInterBank() {
		// TODO Auto-generated constructor stub
	}
	
	public TransReqInterBank(List<ReqInterBankParam> list){
		this.inners = new ArrayList<Inner>();
		for (ReqInterBankParam param : list) {
			Inner inner = new Inner();
			BeanUtils.copyProperties(param,inner);
			inners.add(inner);
		}
	}
	
	@SuppressWarnings("unused")
	private static class Inner implements Serializable{
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 2500326413224240083L;

		@XStreamAlias("insid") 
		private String insid;
		
		@XStreamAlias("trnamt") 
		private String trnamt;
		
		@XStreamAlias("trncur") 
		private String trncur;
		
		@XStreamAlias("priolv") 
		private String priolv;
		
		@XStreamAlias("furinfo") 
		private String furinfo;
		
		@XStreamAlias("fractn") 
		private ReqInterBankDrawee fractn;
		
		@XStreamAlias("toactn") 
		private ReqInterBankPayee toactn;
		
		@XStreamAlias("feeinfo")
		private ReqInterBankDraweeAcc feeinfo;

		public String getInsid() {
			return insid;
		}

		public void setInsid(String insid) {
			this.insid = insid;
		}

		public String getTrnamt() {
			return trnamt;
		}

		public void setTrnamt(String trnamt) {
			this.trnamt = trnamt;
		}

		public String getTrncur() {
			return trncur;
		}

		public void setTrncur(String trncur) {
			this.trncur = trncur;
		}

		public String getPriolv() {
			return priolv;
		}

		public void setPriolv(String priolv) {
			this.priolv = priolv;
		}

		public String getFurinfo() {
			return furinfo;
		}

		public void setFurinfo(String furinfo) {
			this.furinfo = furinfo;
		}

		public ReqInterBankDrawee getFractn() {
			return fractn;
		}

		public void setFractn(ReqInterBankDrawee fractn) {
			this.fractn = fractn;
		}

		public ReqInterBankPayee getToactn() {
			return toactn;
		}

		public void setToactn(ReqInterBankPayee toactn) {
			this.toactn = toactn;
		}

		public ReqInterBankDraweeAcc getFeeinfo() {
			return feeinfo;
		}

		public void setFeeinfo(ReqInterBankDraweeAcc feeinfo) {
			this.feeinfo = feeinfo;
		}
	}
}
